<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script type="text/javascript" charset="utf-8" src="/assets/plug/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/assets/plug/ueditor/ueditor.all.min.js"> </script>
    <script src="/assets/js/jquery-3.3.1.min.js"></script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="/assets/plug/ueditor/lang/zh-cn/zh-cn.js"></script>
    <link rel="stylesheet" href="/assets/css/website.css">
    <title>整站设置</title>
</head>
<body>
    <div class="website" >
        <div class="website_first">
            <ul class="website_ul">
                <li class="jian"><i id="jian_jie">公司简介</i><span></span></li>
                <li class="feng"><i class="feng_cai">企业荣誉</i><span></span></li>
                <li class="zhi"><i class="zhi_zi">企业资质</i><span></span></li>
                <li class="anli"><i class="zhong_xin">案例中心</i><span></span></li>
                <li class="lian"><i class="lian_xi">联系我们</i><span></span></li>
                <li class="wen"><i class="wen_hua">企业文化</i><span></span></li>
            </ul>
        </div>
        <div class="website_second">
            <div class="website_jianjie" >
                <ul>
                    <li>
                        <script id="editor" type="text/plain" name="content"></script>
                    </li>
                    <li>
                        <textarea id="construction" hidden>{$userinfo.construction}</textarea>
                        <input type="submit" id="jianjie_submit" name="提交">
                    </li>
                </ul>
            </div>
            <!--企业文化-->
            <div class="wenhua_content" >
                <ul>
                    <li>
                        <script id="editor2" type="text/plain" name="culture"></script>
                    </li>
                    <li>
                        <textarea id="culture" hidden>{$userinfo.culture}</textarea>
                        <input type="submit" id="wenhua_submit" name="提交">
                    </li>
                </ul>
            </div>
            <div class="website_fencai" >
                <ul class="website_fencai_ul">
                    <li>
                        <span>选择图片<i>(建议大小280*300)</i></span>
                        <e>图片描述: >></e>
                        {if condition="$companyinfo['fengcai_img1']"}
                            <input type="text" name="anchor1" value="{$companyinfo['fengcai_img1'][0]}">
                            <div class="sixfile_upload">
                                <input id="file_upload1"type="file" multiple="true">
                                <span>上传图一</span>
                            </div>
                            <img id="txtimg1" src="{$companyinfo['fengcai_img1'][1]}" alt="" style="width: 120px;height: 60px;">
                        {else /}
                            <input type="text" name="anchor1" value="">
                            <div class="sixfile_upload">
                                <input id="file_upload1"type="file" multiple="true">
                                <span>上传图一</span>
                            </div>
                            <img id="txtimg1" src="">
                        {/if}
                    </li>
                    <li>
                        <span>选择图片<i>(建议大小280*300)</i></span>
                        <e>图片描述: >></e>
                        {if condition="$companyinfo['fengcai_img2']"}
                            <input type="text" name="anchor2" value="{$companyinfo['fengcai_img2'][0]}">
                            <div class="sixfile_upload">
                                <input id="file_upload2"type="file" multiple="true">
                                <span>上传图二</span>
                            </div>
                            <img id="txtimg2" src="{$companyinfo['fengcai_img2'][1]}" alt=""  style="width: 120px;height: 60px;">
                        {else /}
                            <input type="text" name="anchor2" value="">
                            <div class="sixfile_upload">
                                <input id="file_upload2"type="file" multiple="true">
                                <span>上传图二</span>
                            </div>
                            <img id="txtimg2" src="">
                        {/if}
                    </li>
                    <li>
                        <span>选择图片<i>(建议大小280*300)</i></span>
                        <e>图片描述: >></e>
                        {if condition="$companyinfo['fengcai_img3']"}
                            <input type="text" name="anchor3" value="{$companyinfo['fengcai_img3'][0]}">
                            <div class="sixfile_upload">
                                <input id="file_upload3"type="file" multiple="true">
                                <span>上传图三</span>
                            </div>
                            <img id="txtimg3" src="{$companyinfo['fengcai_img3'][1]}" alt=""  style="width: 120px;height: 60px;">
                        {else /}
                            <input type="text" name="anchor3" value="">
                            <div class="sixfile_upload">
                                <input id="file_upload3"type="file" multiple="true">
                                <span>上传图三</span>
                            </div>
                            <img id="txtimg3" src="">
                        {/if}
                    </li>
                    <li>
                        <span>选择图片<i>(建议大小280*300)</i></span>
                        <e>图片描述: >></e>
                        {if condition="$companyinfo['fengcai_img4']"}
                            <input type="text" name="anchor4" value="{$companyinfo['fengcai_img4'][0]}">
                            <div class="sixfile_upload">
                                <input id="file_upload4"type="file" multiple="true">
                                <span>上传图四</span>
                            </div>
                            <img id="txtimg4" src="{$companyinfo['fengcai_img4'][1]}" alt=""  style="width: 120px;height: 60px;">
                        {else /}
                            <input type="text" name="anchor4" value="">
                            <div class="sixfile_upload">
                                <input id="file_upload4"type="file" multiple="true">
                                <span>上传图四</span>
                            </div>
                            <img id="txtimg4" src="">
                        {/if}
                    </li>
                    <li>
                        <span>选择图片<i>(建议大小280*300)</i></span>
                        <e>图片描述: >></e>
                        {if condition="$companyinfo['fengcai_img5']"}
                            <input type="text" name="anchor5" value="{$companyinfo['fengcai_img5'][0]}">
                            <div class="sixfile_upload">
                                <input id="file_upload5"type="file" multiple="true">
                                <span>上传图五</span>
                            </div>
                            <img id="txtimg5" src="{$companyinfo['fengcai_img5'][1]}" alt=""  style="width: 120px;height: 60px;">
                        {else /}
                            <input type="text" name="anchor5" value="">
                            <div class="sixfile_upload">
                                <input id="file_upload5"type="file" multiple="true">
                                <span>上传图五</span>
                            </div>
                            <img id="txtimg5" src="">
                        {/if}
                    </li>
                    <li>
                        <span>选择图片<i>(建议大小280*300)</i></span>
                        <e>图片描述: >></e>
                        {if condition="$companyinfo['fengcai_img6']"}
                            <input type="text" name="anchor6" value="{$companyinfo['fengcai_img6'][0]}">
                            <div class="sixfile_upload">
                                <input id="file_upload6"type="file" multiple="true">
                                <span>上传图六</span>
                            </div>
                            <img id="txtimg6" src="{$companyinfo['fengcai_img6'][1]}" alt=""  style="width: 120px;height: 60px;">
                        {else /}
                            <input type="text" name="anchor6" value="">
                            <div class="sixfile_upload">
                                <input id="file_upload6"type="file" multiple="true">
                                <span>上传图六</span>
                            </div>
                            <img id="txtimg6" src="">
                        {/if}
                    </li>
                    <li>
                        <input type="submit" id="fencai_submit" name="提交">
                    </li>
                </ul>
            </div>
            <div class="website_zizhi" >
                <ul class="website_zizhi_ul">
                    <li>
                        <span>营业执照：</span>
                        <div class="zhizhao_upload">
                            <input id="file_upload_zhao1" type="file" multiple="true">
                            <span>点击上传</span>
                        </div>
                        {if condition="$companyinfo['register_img']"}
                            <img id="txtimg_zhao1" src="{$companyinfo['register_img']}" alt="营业执照">
                        {else /}
                            <img id="txtimg_zhao1" src="" alt="">
                        {/if}
                    </li>
                    <li>
                        <span>注册号：</span>
                        <input type="text" name="register_code" value="{$companyinfo['register_code']}" placeholder="请输入注册号">
                    </li>
                     <li>
                        <span>注册名称：</span>
                        <input type="text" name="register_name" value="{$companyinfo['register_name']}" placeholder="请输入注册名称">
                    </li>
                     <li>
                        <span>注册住所：</span>
                        <input type="text" name="register_address" value="{$companyinfo['register_address']}" placeholder="请输入注册住所">
                    </li>
                     <li>
                        <span>法人代表：</span>
                        <input type="text" name="register_people" value="{$companyinfo['register_people']}" placeholder="请输入法人代表">
                    </li>
                     <li>
                        <span>注册资本：</span>
                        <input type="text" name="register_money" value="{$companyinfo['register_money']}" placeholder="请输入注册资本">
                    </li>
                     <li>
                        <span>实收资本：</span>
                        <input type="text" name="rel_register_money" value="{$companyinfo['rel_register_money']}" placeholder="请输入实收资本">
                    </li>
                     <li>
                        <span>公司类型：</span>
                        <input type="text" name="company_type" value="{$companyinfo['company_type']}" placeholder="请输入公司类型">
                    </li>
                     <li>
                        <span>经营范围：</span>
                        <input type="text" name="register_scope" value="{$companyinfo['register_scope']}" placeholder="请输入经营范围">
                    </li>
                     <li>
                        <span>成立日期：</span>
                        <input type="text" name="launch_time" value="{$companyinfo['launch_time']}" placeholder="请输入成立日期">
                    </li>
                     <li>
                        <span>营业期限：</span>
                        <input type="text" name="limit_time" value="{$companyinfo['limit_time']}" placeholder="请输入营业期限">
                    </li>
                    <li>
                        <input type="submit" id="zizhi_submit" value="提交">
                    </li>
                </ul>
            </div>
            <div class="website_anli">
                <ul class="website_anli_ul">
                    <li>
                        <span>选择图片<i>(建议大小280*300)</i></span>
                        <e>图片描述: >></e>
                        {if condition="$companyinfo['anli_img1']"}
                            <input type="text" name="anchor_anli1" value="{$companyinfo['anli_img1'][0]}">
                            <div class="sixfile_upload">
                                <input id="file_upload_anli1"type="file" multiple="true">
                                <span>上传图一</span>
                            </div>
                            <img id="txtimg_anli1" src="{$companyinfo['anli_img1'][1]}" alt=""  style="width: 120px;height: 60px;">
                        {else /}
                            <input type="text" name="anchor_anli1" value="">
                            <div class="sixfile_upload">
                                <input id="file_upload_anli1"type="file" multiple="true">
                                <span>上传图一</span>
                            </div>
                            <img id="txtimg_anli1" src="" alt="">
                        {/if}

                    </li>
                    <li>
                        <span>选择图片<i>(建议大小280*300)</i></span>
                        <e>图片描述: >></e>
                        {if condition="$companyinfo['anli_img2']"}
                            <input type="text" name="anchor_anli2" value="{$companyinfo['anli_img2'][0]}">
                            <div class="sixfile_upload">
                                <input id="file_upload_anli2"type="file" multiple="true">
                                <span>上传图二</span>
                            </div>
                            <img id="txtimg_anli2" src="{$companyinfo['anli_img2'][1]}" alt="" style="width: 120px;height: 60px;">
                        {else /}
                            <input type="text" name="anchor_anli2" value="">
                            <div class="sixfile_upload">
                                <input id="file_upload_anli2"type="file" multiple="true">
                                <span>上传图二</span>
                            </div>
                            <img id="txtimg_anli2" src="" alt="">
                        {/if}

                    </li>
                    <li>
                        <span>选择图片<i>(建议大小280*300)</i></span>
                        <e>图片描述: >></e>
                        {if condition="$companyinfo['anli_img3']"}
                            <input type="text" name="anchor_anli3" value="{$companyinfo['anli_img3'][0]}">
                            <div class="sixfile_upload">
                                <input id="file_upload_anli3"type="file" multiple="true">
                                <span>上传图三</span>
                            </div>
                            <img id="txtimg_anli3" src="{$companyinfo['anli_img3'][1]}" alt="" style="width: 120px;height: 60px;">
                        {else /}
                            <input type="text" name="anchor_anli3" value="">
                            <div class="sixfile_upload">
                                <input id="file_upload_anli3"type="file" multiple="true">
                                <span>上传图三</span>
                            </div>
                            <img id="txtimg_anli3" src="" alt="">
                        {/if}

                    </li>
                    <li>
                        <span>选择图片<i>(建议大小280*300)</i></span>
                        <e>图片描述: >></e>
                        {if condition="$companyinfo['anli_img4']"}
                            <input type="text" name="anchor_anli4" value="{$companyinfo['anli_img4'][0]}">
                            <div class="sixfile_upload">
                                <input id="file_upload_anli4"type="file" multiple="true">
                                <span>上传图四</span>
                            </div>
                            <img id="txtimg_anli4" src="{$companyinfo['anli_img4'][1]}" alt="" style="width: 120px;height: 60px;">
                        {else /}
                            <input type="text" name="anchor_anli4" value="">
                            <div class="sixfile_upload">
                                <input id="file_upload_anli4"type="file" multiple="true">
                                <span>上传图四</span>
                            </div>
                            <img id="txtimg_anli4" src="" alt="">
                        {/if}

                    </li>
                    <!--<li>-->
                        <!--<span>选择图片<i>(建议大小280*300)</i></span>-->
                        <!--<e>图片描述: >></e>-->
                        <!--{if condition="$companyinfo['anli_img5']"}-->
                            <!--<input type="text" name="anchor_anli5" value="{$companyinfo['anli_img5'][0]}">-->
                            <!--<div class="sixfile_upload">-->
                                <!--<input id="file_upload_anli5"type="file" multiple="true">-->
                                <!--<span>上传图五</span>-->
                            <!--</div>-->
                            <!--<img id="txtimg_anli5" src="{$companyinfo['anli_img5'][1]}" alt="" style="width: 120px;height: 60px;">-->
                        <!--{else /}-->
                            <!--<input type="text" name="anchor_anli5" value="">-->
                            <!--<div class="sixfile_upload">-->
                                <!--<input id="file_upload_anli5"type="file" multiple="true">-->
                                <!--<span>上传图五</span>-->
                            <!--</div>-->
                            <!--<img id="txtimg_anli5" src="" alt="">-->
                        <!--{/if}-->

                    <!--</li>-->
                    <!--<li>-->
                        <!--<span>选择图片<i>(建议大小280*300)</i></span>-->
                        <!--<e>图片描述: >></e>-->
                        <!--{if condition="$companyinfo['anli_img6']"}-->
                            <!--<input type="text" name="anchor_anli6" value="{$companyinfo['anli_img6'][0]}">-->
                            <!--<div class="sixfile_upload">-->
                                <!--<input id="file_upload_anli6"type="file" multiple="true">-->
                                <!--<span>上传图六</span>-->
                            <!--</div>-->
                            <!--<img id="txtimg_anli6" src="{$companyinfo['anli_img6'][1]}" alt="" style="width: 120px;height: 60px;">-->
                        <!--{else /}-->
                            <!--<input type="text" name="anchor_anli6" value="">-->
                            <!--<div class="sixfile_upload">-->
                                <!--<input id="file_upload_anli6"type="file" multiple="true">-->
                                <!--<span>上传图六</span>-->
                            <!--</div>-->
                            <!--<img id="txtimg_anli6" src="" alt="">-->
                        <!--{/if}-->

                    <!--</li>-->
                    <li>
                        <input type="submit" id="anli_submit" name="提交">
                    </li>
                </ul>
            </div>
            <div class="lianxi" >
                <ul>
                    <li>
                        <span>公司名称：</span>
                        <input type="text" name="company_name" value="{$userinfo.company_name}" placeholder="请输入公司名称">
                    </li>
                    <li>
                        <span>关键词：</span>
                        <input type="text" name="seo_keywords" value="{$userinfo.seo_keywords}" placeholder="请输入关键词">
                    </li>
                    <li>
                        <span>联系人：</span>
                        <input type="text" name="connect_people" value="{$userinfo.connect_people}" placeholder="请输入联系人">
                    </li>
                    <li>
                        <span>手机：</span>
                        <input type="text" name="connect_method" value="{$userinfo.connect_method}" placeholder="请输入手机">
                    </li>
                    <li>
                        <span>电话：</span>
                        <input type="text" name="connect_tel" value="{$userinfo.connect_tel}" placeholder="请输入电话">
                    </li>
                    <li>
                        <span>传真：</span>
                        <input type="text" name="fax_num" value="{$userinfo.fax_num}" placeholder="请输入传真">
                    </li>
                    <li>
                        <span>邮箱：</span>
                        <input type="text" name="email" value="{$userinfo.email}" placeholder="请输入邮箱">
                    </li>
                    <li>
                        <span>企业地址：</span>
                        <input type="text" name="company_address" value="{$userinfo.company_address}" placeholder="请输入企业地址">
                    </li>
                    <li>
                        <span>网址：</span>
                        <input type="text" name="legalurl" value="{$userinfo.legalurl}" placeholder="请输入不加http的网址">
                        <span class="legurl_tips"></span>
                    </li>
                    <li>
                        <input type="submit" id="lianxi_submit" value="提交">
                    </li>
                </ul>
            </div>
        </div>
    </div>
</body>
<script src="/assets/js/website.js"></script>
<script>
    $(function () {
        UE.getEditor('editor', {
            toolbars: [['fullscreen', 'source', 'undo', 'redo', 'bold', 'italic',
                'underline','fontborder', 'backcolor', 'fontsize', 'fontfamily',
                'justifyleft', 'justifyright','justifycenter', 'justifyjustify',
                'strikethrough','superscript', 'subscript', 'removeformat',
                'formatmatch','autotypeset', 'blockquote', 'pasteplain', '|',
                'forecolor', 'backcolor','insertorderedlist', 'insertunorderedlist',
                'selectall', 'cleardoc', 'link', 'unlink','emotion', 'help'
            ]],
            elementPathEnabled: false,
            wordCount: true
        });

        var oneContent = $('#construction').text();
        setTimeout(function () {
            UE.getEditor('editor').setContent(oneContent, true);
        }, 500)
        //提交简介
        $('#jianjie_submit').click(function (event) {
            var construction = UE.getEditor('editor').getContent();
            $.ajax({
                url: '/admin/website/editJianjie',
                data: {construction: construction},
                type: 'post',
                success: function (res) {
                    alert(res.info);
                    event.preventDefault();
                }
            })
        })
        //second
        UE.getEditor('editor2', {
            toolbars: [['fullscreen', 'source', 'undo', 'redo', 'bold', 'italic',
                'underline','fontborder', 'backcolor', 'fontsize', 'fontfamily',
                'justifyleft', 'justifyright','justifycenter', 'justifyjustify',
                'strikethrough','superscript', 'subscript', 'removeformat',
                'formatmatch','autotypeset', 'blockquote', 'pasteplain', '|',
                'forecolor', 'backcolor','insertorderedlist', 'insertunorderedlist',
                'selectall', 'cleardoc', 'link', 'unlink','emotion', 'help'
            ]],
            elementPathEnabled: false,
            wordCount: true
        });
        var towContent = $('#culture').val();
        setTimeout(function () {
            UE.getEditor('editor2').setContent(towContent, true);
        }, 600)
        //提交文化
        $('#wenhua_submit').click(function (event) {
            var culture = UE.getEditor('editor2').getContent();
            $.ajax({
                url: '/admin/website/editCulture',
                data: {culture: culture},
                type: 'post',
                success: function (res) {
                    alert(res.info);
                    event.preventDefault();
                }
            })
        })

    })
</script>
</html>